<div class="page-body">
    <div class="row">
        <div class="widget">
            <div class="widget-header
            <switch name="T_type">
            <case value="1">bg-magenta</case>
            <case value="2">bg-palegreen</case>
            <case value="3">bg-lightred</case>
            <case value="4">bg-blue</case>
            <case value="5">bg-blueberry</case>
            <case value="6">bg-gold</case>
            <default />bg-magenta
            </switch>
                                ">
            <span class="widget-caption">{$T_title|default=CONTROLLER_NAME}</span>
                                <!--Widget Buttons-->
        </div>
            <div class="widget-body">
                <div id="horizontal-form">
                    <form class="form-horizontal form_buy" role="form"
                          action="{:U('doModify')}"
                          method="post" enctype="multipart/form-data" onSubmit="return false;">
                        <div class="form-group">
                            <label for="card_id" class="col-sm-3 control-label no-padding-right">会员卡：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="card_id" name="card_id" value="" onkeydown="getCard()" required>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right"></label>
                            <div class="col-sm-3">
                                <ul class="type_info">

                                </ul>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="father_name" class="col-sm-3 control-label no-padding-right">父亲姓名：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="father_name" name="father_name" value="" onkeydown="" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="father_phone" class="col-sm-3 control-label no-padding-right">联系号码：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="father_phone" name="father_phone" value="" onkeydown="" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="mother_name" class="col-sm-3 control-label no-padding-right">母亲姓名姓名：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="mother_name" name="mother_name" value="" onkeydown="" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="mother_phone" class="col-sm-3 control-label no-padding-right">联系号码：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="mother_phone" name="mother_phone" value="" onkeydown="" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="child_name" class="col-sm-3 control-label no-padding-right">孩子姓名：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="child_name" name="child_name" value="" onkeydown="" required>
                            </div>
                            <div class="col-sm-3">
                                <span class="danger">*必填</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="child_birth" class="col-sm-3 control-label no-padding-right">生日：</label>
                            <div class="col-sm-3">
                                <input class="form-control date-picker" id="child_birth" name="child_birth" type="text" data-date-format="yyyy-mm-dd">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="child_sex" class="col-sm-3 control-label no-padding-right">性别：</label>
                            <div class="col-sm-3">
                                        <input name="child_sex" class="sex sex_1" type="radio" value="1" style="opacity: 1;position: initial;">
                                        男
                                        <input name="child_sex" class="sex sex_2" type="radio" value="2" style="opacity: 1;position: initial;">
                                        女
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="child_birth" class="col-sm-3 control-label no-padding-right">学校名称：</label>
                            <div class="col-sm-3">
                                <input class="form-control" id="child_school" name="child_school" type="text">
                            </div>
                        </div>
                        <div class="form-group  ">
                            <div class="col-sm-offset-3 col-sm-10">
                                <p class="label label-darkpink graded error_info"></p><br>
                                <input type="button" class="btn btn-primary" value="提交" onkeypress="FSubmit()" onclick="FSubmit()">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/admin/js/datetime/bootstrap-datepicker.js"></script>
<script>

    $('.date-picker').datepicker();

    function getsuccess(data){
        $(".error_info").html("");

        $("[name=father_name]").val(data.data.father_name);
        $("[name=father_phone]").val(data.data.father_phone);
        $("[name=mother_name]").val(data.data.mother_name);
        $("[name=mother_phone]").val(data.data.mother_phone);
        $("[name=child_name]").val(data.data.child_name);
        $("[name=child_birth]").val(data.data.child_birth);
        $(".sex").attr("checked","");
        log(data.data.child_sex);
        $(".sex_"+data.data.child_sex).attr("checked","checked");
        $("[name=child_school]").val(data.data.child_school);
    }

    function cal_all(){

    }
    //提交
    function FSubmit(){
        if(!confirm('确认操作?')){
            return;
        }
        if($.trim($("#card_id").val())==""){
            $(".error_info").html("请输入会员卡号");
            return;
        }
        if($.trim($("#child_name").val())==""){
            $(".error_info").html("小孩名称必填");
            return;
        }
        $(".form_buy").attr("onSubmit","");
        $(".form_buy").submit();
        return true;

    }
</script>